<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%
    // 获取请求URL信息用于调试
    String requestURL = request.getRequestURL().toString();
    String requestURI = request.getRequestURI();
    String contextPath = request.getContextPath();
    String servletPath = request.getServletPath();
    String pathInfo = request.getPathInfo();
    String queryString = request.getQueryString();
%>
<!DOCTYPE html>
<html>
<head>
    <title>调试信息</title>
    <meta charset="UTF-8">
</head>
<body>
    <h2>请求调试信息</h2>
    <ul>
        <li>Request URL: <%= requestURL %></li>
        <li>Request URI: <%= requestURI %></li>
        <li>Context Path: <%= contextPath %></li>
        <li>Servlet Path: <%= servletPath %></li>
        <li>Path Info: <%= pathInfo %></li>
        <li>Query String: <%= queryString %></li>
    </ul>
    
    <h2>测试链接</h2>
    <ul>
        <li><a href="view?id=1">相对路径: view?id=1</a></li>
        <li><a href="./view?id=1">相对路径: ./view?id=1</a></li>
        <li><a href="/web117/employee/view?id=1">绝对路径: /web117/employee/view?id=1</a></li>
        <li><a href="<%= request.getContextPath() %>/employee/view?id=1">动态路径: <%= request.getContextPath() %>/employee/view?id=1</a></li>
    </ul>
</body>
</html>